<?php 

/**
 * Joomla! 1.5 component retweet
 * @version 0.1
 * @author Chris Borkowski 
 * @package com_retweet
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
 **/


// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );


jimport( 'joomla.application.component.controller' );

 /**
  * Retweet Component Controller
  *
  * @package Retweet
  */

  class retweetController extends JController
  {
		/**
		 * Method to show a retweet view
		 */
		function display()
		{
			 // Set a default view if none exists
			 if ( ! JRequest::getCmd( 'view' ) ) {
					JRequest::setVar('view', 'categories' );
			 }
		  	 //update the hit count for the item
  		  	 if(JRequest::getCmd('view') == 'item')
  			 {
  				$model =& $this->getModel('item');
  				$model->hit();
 			 }
 		parent::display();
  		}
  }